class TacticalMineSlowingProj extends FlameTendril;

var() KFMonster StuckTo;

simulated function PostBeginPlay();

simulated singular function HitWall(vector HitNormal, actor Wall)
{
	Destroy();
}

simulated function Landed( vector HitNormal )
{
	Destroy();
}

simulated function Explode(vector HitLocation,vector HitNormal)
{
	Destroy();
}

simulated function ProcessTouch (Actor Other, vector HitLocation);

simulated function Destroyed();

function Timer()
{
	if (StuckTo != None)
	{
		if (StuckTo.Health <= 0)
			Destroy();
			
		if (ROLE == ROLE_Authority)
		{
			//StuckTo.TakeDamage(Damage, Instigator, StuckTo.Location, MomentumTransfer * Normal(Velocity), MyDamageType);
			
			if (LifeSpan <= 1.0)
			{
				//StuckTo.OriginalGroundSpeed=DefaultGroundSpeed;
				DKMonster(StuckTo).RemoveSlowingDebuf(class'DKMonster'.default.MC_TACTICMINE);
				Destroy();
			}
		}
	}
}

function SetSpeeds()
{
	DKMonster(StuckTo).AddSlowingDebuf(class'DKMonster'.default.MC_TACTICMINE);
}

simulated function Stick(actor HitActor, vector HitLocation)
{
	local name NearestBone;
	local float dist;

	StuckTo=KFMonster(HitActor);
	SetSpeeds();
	
	SetPhysics(PHYS_None);

	NearestBone = GetClosestBone(HitLocation, HitLocation, dist , 'CHR_Spine2' , 15 );
	HitActor.AttachToBone(self,NearestBone);
	
	SetTimer(0.5,true);
}

simulated function DestroyTrail()
{
	if ( Trail != none )
	{
		Trail.mRegen=False;
		Trail.SetPhysics(PHYS_None);
	}

	if ( FlameTrail != none )
	{
		FlameTrail.Kill();
		FlameTrail.SetPhysics(PHYS_None);
	}
}

defaultproperties
{
     Speed=1.000000
     MaxSpeed=1.000000
     Damage=15.000000
     DamageRadius=1.000000
     //MyDamageType=Class'WTF.WTFEquipDamTypeLethalInjection'
     DrawType=DT_StaticMesh
     StaticMesh=StaticMesh'KF_pickups2_Trip.Supers.MP7_Dart'
     LifeSpan=8.000000
     DrawScale=0.010000
}
